from flask.blueprints import Blueprint
from flask_restful import Api

from toutiaoapi.flaskrestful import BaseApi

user_blueprint = Blueprint('user',__name__,url_prefix='/app/v1_0')
user_api = BaseApi(user_blueprint)

from . import views


#每个视图先绑定路由
#发送短信验证码
user_api.add_resource(views.SmsCodeResource,'/sms/codes/<mobile:mobile>/')
#用户登录
user_api.add_resource(views.LoginResource,'/authorizations')
#获取用户信息
user_api.add_resource(views.UserInfoResource,'/user')